package ro.prjmanager.constants;

/*
 * BackendConstants.java
 *
 * Copyright (c) 2008 Teamnet. All Rights Reserved.
 *
 * This source file may not be copied, modified or redistributed,
 * in whole or in part, in any form or for any reason, without the express
 * written consent of Teamnet.
 */

/**
 * This interface hold all constants used in backend generator system
 */
public interface BackendConstants {
    String DATABASE_CONFIG_PATH="ro/prjmanager/generator/";
    String DATABASE_CONFIG_FILE="database.properties";
    String APPLICATION_CONFIG_PATH="ro/prjmanager/generator/config/";
    String APPLICATION_CONFIG_NAME="application.config.properties";
    String RESTR_SUFF_CONFIG_PATH="ro/prjmanager/generator/config/";
    String RESTR_SUFF_CONFIG_NAME="restrictedNameSuffixes.properties";
    String RESTR_KEY_PATTERN="restricted.suffix";
    String JAVA_DATE_PATTERN="dd-MM-yyyy";


    String DATABASE_DRIVER_PROPERTIES="database.driver";
    String DATABASE_SCHEMA_PROPERTIES="database.schema";
    String DATABASE_URL_PROPERTIES="database.url";
    String DATABASE_USER_PROPERTIES="database.username";
    String DATABASE_PWD_PROPERTIES="database.password";
    String SQL_TABLE_DEFINITION="SELECT * FROM ?";


    int TABLE_CAT=1;
    int TABLE_SCHEM=2;
    int TABLE_NAME=3;
    int COLUMN_NAME=4;
    int DATA_TYPE=5;
    int TYPE_NAME=6;    
    int COLUMN_SIZE=7;
    int BUFFER_LENGTH=8;
    int DECIMAL_DIGITS=9;
    int NUM_PREC_RADIX=10;
    int NULLABLE=11;
    int REMARKS=12;
    int COLUMN_DEF=13;
    int SQL_DATA_TYPE=14;
    int SQL_DATETIME_SUB=15;
    int CHAR_OCTET_LENGTH=16;
    int ORDINAL_POSITION=17;
    int IS_NULLABLE=18;
    int SCOPE_CATLOG=19;
    int SCOPE_SCHEMA=20;
    int SCOPE_TABLE=21;
    int SOURCE_DATA_TYPE=22;
    int IS_NULL = 1;
    int IMP_FK_COLUMN_NAME = 8;
    int IMP_FK_COLUMN_FK_NAME = 4;
    int IMP_FK_TABLE_REF_NAMe = 3;
    String ALL_COLUMNS_SEARCH = "%";
    int EXP_FK_COLUMN_NAME = 4;
    int EXP_FK_COLUMN_REF_NAME = 8;
    int EXP_FK_REF_TABLE_NAME = 7;
    String MISSING = "MISSING ";
    String GET = "get";
    String SET = "set";


    String GENERATION_BASE_PATH = "generation.base.path";
    String GENERATION_DIRECTORY_PATTERN = "generation.directory.pattern";

    String PATH_SEPARATOR = "/";
    String JAVA_FILE_EXT = ".java";
    String PACKAGE_SEPARATOR = ".";
    String DAO = "Dao";
    String DAO_IMPL = "DaoImpl";
    String SERVICE = "Service";
    String SERVICE_LOCAL = "ServiceLocal";
    String SERVICE_REMOTE = "ServiceRemote";

    String APPLICATION_GENERAL_COMPANY = "application.general.company";
    String APPLICATION_GENERAL_USER = "application.general.user";
    String APPLICATION_GENERAL_VERSION = "application.general.version";
    String APPLICATION_GENERAL_PACKAGE_ROOT = "application.general.package.root";
    String APPLICATION_GENERAL_SRC = "application.general.src";

    String APPLICATION_COMMON_MODEL_TEMPLATE_PATH = "application.common.model.template.path";
    String APPLICATION_COMMONS_MODEL_RELATIVEPATH = "application.commons.model.relative.path";
    String APPLICATION_COMMONS_MODEL_RELATIVE_PACKAGE = "application.commons.model.relative.package";
    String APPLICATION_COMMONS_NAMSPACE = "application.commons.namspace";


    String APPLICATION_FMK_PACKAGE = "application.fmk.package";
    String APPLICATION_FMK_COMMON_PACKAGE = "application.fmk.common.package";

    String APPLICATION_BACKEND_NAMESPACE = "application.backend.namespace";
    String APPLICATION_BACKEND_DAO_RELATIVE_PACKAGE = "application.backend.dao.relative.package";
    String APPLICATION_BACKEND_DAO_TEMPLATE_PATH = "application.backend.dao.template.path";
    String APPLICATION_BACKEND_DAO_IMPL_TEMPLATE_PATH = "application.backend.dao.impl.template.path";
    String APPLICATION_BACKEND_BUSINESS_RELATIVE_PACKAGE = "application.backend.business.relative.package";
    String APPLICATION_BACKEND_BUSINESS_LOCAL_TEMPLATE_PATH = "application.backend.business.local.template.path";
    String APPLICATION_BACKEND_BUSINESS_SERVICE_TEMPLATE_PATH = "application.backend.business.service.template.path";

    String APPLICATION_BACKEND_BUSINESS_REMOTE_TEMPLATE_PATH = "application.backend.business.remote.template.path";

    String EMPTY_STRING = "";
    String SPACE_STRING = " ";
}
